package org.zoomdev.zoom.web.handlers;

import org.zoomdev.zoom.web.FilterHandler;
import org.zoomdev.zoom.web.exception.StatusException;
import org.zoomdev.zoom.web.rendering.impl.HtmlRendering;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class NotFoundFilterHandler extends FilterHandler {

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
        HtmlRendering.render(new StatusException.NotFoundException(), response);
    }
}
